-- GENERATED SPELL FOR [Stormforged Giant] --


function spell0_28920(pUnit, Event) --@Soul Strike,n/a--
pUnit:FullCastSpellOnTarget(32315,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28920', 5251, 1)
end

function spell1_28920(pUnit, Event) --@Stormbolt,n/a--
pUnit:FullCastSpellOnTarget(53072,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28920', 608, 1)
end

function spell2_28920(pUnit, Event) --@Stormbolt,n/a--
pUnit:FullCastSpellOnTarget(59155,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28920', 589, 1)
end

function spell3_28920(pUnit, Event) --@Thunderstorm,Self--
pUnit:FullCastSpellOnTarget(53071,pUnit)
pUnit:RegisterEvent('Sorts_28920', 678, 1)
end

function spell4_28920(pUnit, Event) --@Thunderstorm,Self--
pUnit:FullCastSpellOnTarget(59154,pUnit)
pUnit:RegisterEvent('Sorts_28920', 2000, 1)
end

function Sorts_28920(pUnit, Event)
local choix_sorts_28920 = math.random(0, 4)
if choix_sorts_28920 == 0 then
pUnit:RegisterEvent('spell0_28920', 1, 1)
end
if choix_sorts_28920 == 1 then
pUnit:RegisterEvent('spell1_28920', 1, 1)
end
if choix_sorts_28920 == 2 then
pUnit:RegisterEvent('spell2_28920', 1, 1)
end
if choix_sorts_28920 == 3 then
pUnit:RegisterEvent('spell3_28920', 1, 1)
end
if choix_sorts_28920 == 4 then
pUnit:RegisterEvent('spell4_28920', 1, 1)
end
end

function mob28920_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_28920', math.random(1500, 3000), 1)
end

function mob28920_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28920_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28920_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(28920, 1, 'mob28920_Action')
RegisterUnitEvent(28920, 2, 'mob28920_Leave')
RegisterUnitEvent(28920, 3, 'mob28920_Kill')
RegisterUnitEvent(28920, 4, 'mob28920_Die')
